package com.zan.worktestmqconsumer.listener;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.messaging.Message;
import org.springframework.stereotype.Component;

/**
 * @Author Zan
 * @Create 2024/10/16 10:42
 * @ClassName: TestListener
 * @Description : TODO 请用一句话描述该类的功能
 */
@Component
@RocketMQMessageListener(topic = "zzy2", consumerGroup = "work-test4-zzy-consumer-group")
public class TestListener implements RocketMQListener<String> {
    @Override
    public void onMessage(String message) {
        System.out.printf("received message: %s", message);
    }
}
